/*
 * Copyright (c) 2015, the DeltaSync# project. All Rights Reserved.
 * This project is a C# port of the JDeltaSync project:
 *     http://jdeltasync.googlecode.com
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

using System;
using System.Collections.Generic;

namespace PM.Net.DeltaSync {
    /**
     * Used by {@link DeltaSyncClientHelper} to cache {@link Folder}s and {@link Message}.
     */
    public interface Store {
        string GetFoldersSyncKey (string username);
        string GetMessagesSyncKey(string username, Folder folder);
        void UpdateFolders (string username, string syncKey, 
                            IEnumerable<Folder> added, IEnumerable<string> deleted);
        void ResetFolders  (string username);
        void UpdateMessages(string username, Folder folder, string syncKey, 
                            IEnumerable<Message> added, IEnumerable<string> deleted);
        void ResetMessages (string username, Folder folder);
        List<Folder>  GetFolders (string username);
        List<Message> GetMessages(string username, Folder folder);
    }
}
    